


# 509. 斐波那契数

def main(n):
    dp = [0] * (n+2)
    dp[0] = 0
    dp[1] = 1
    for i in range(2,n+1):
        dp[i] = dp[i-2] + dp[i-1]
    return dp[n]

if __name__ == "__main__":
    n = int(input())
    result = main(n)
    print(result)
